a11y: Treat PRESENTATION like NONE
authorMatthias Clasen <mclasen@redhat.com>
Wed, 21 Oct 2020 18:40:34 +0000 (14:40 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 21 Oct 2020 18:40:34 +0000 (14:40 -0400)
This is what ARIA tells us to do. NONE is just another
name for PRESENTATION.

gtk/gtkaccessible.c
gtk/gtkenums.h

index bef2ced14eb2de9c0f832a982603cf6c00f40016..a98bd90ae2cbb5115a4bd65543d8a13385f54415 100644 (file)
@@ -746,7 +746,8 @@ gtk_accessible_should_present (GtkAccessible *self)
       !gtk_widget_get_visible (GTK_WIDGET (self)))
     return FALSE;
 
-  if (gtk_accessible_get_accessible_role (self) == GTK_ACCESSIBLE_ROLE_NONE)
+  if (gtk_accessible_get_accessible_role (self) == GTK_ACCESSIBLE_ROLE_NONE ||
+      gtk_accessible_get_accessible_role (self) == GTK_ACCESSIBLE_ROLE_PRESENTATION)
     return FALSE;
 
   return TRUE;
index 36e90b71bb9a76534f96bcefbd7948f1a519599b..28ed4fb2f1707c946d189f37014d8cc31c624ca3 100644 (file)
@@ -1202,7 +1202,7 @@ typedef enum {
  * @GTK_ACCESSIBLE_ROLE_NONE: An element that is not represented to accessibility technologies.
  * @GTK_ACCESSIBLE_ROLE_NOTE: Unused
  * @GTK_ACCESSIBLE_ROLE_OPTION: Unused
- * @GTK_ACCESSIBLE_ROLE_PRESENTATION: Unused
+ * @GTK_ACCESSIBLE_ROLE_PRESENTATION: An element that is not represented to accessibility technologies.
  * @GTK_ACCESSIBLE_ROLE_PROGRESS_BAR: An element that displays the progress
  *    status for tasks that take a long time.
  * @GTK_ACCESSIBLE_ROLE_RADIO: A checkable input in a group of radio roles,